package timing.ukulele.third.convertor.msg;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;
import timing.ukulele.common.data.DtoBaseDataConverter;
import timing.ukulele.data.third.data.msg.MessageTemplateDTO;
import timing.ukulele.data.third.view.msg.MessageTemplateVO;
import timing.ukulele.third.persistent.msg.MessageTemplate;

@Mapper
public interface MessageTemplateConverter extends DtoBaseDataConverter<MessageTemplate, MessageTemplateDTO, MessageTemplateVO> {

    MessageTemplateConverter INSTANCE = Mappers.getMapper(MessageTemplateConverter.class);

    @Override
    @Mappings({
            @Mapping(target = "createBy", ignore = true),
            @Mapping(target = "createTime", ignore = true),
            @Mapping(target = "updateBy", ignore = true),
            @Mapping(target = "updateTime", ignore = true),
    })
    MessageTemplate v2p(MessageTemplateVO vo);

    @Override
    MessageTemplateVO p2v(MessageTemplate po);

}
